Repository navigation
ci: plugin rebuild loop finishes instead of hanging on --watch - #370
Merged
Merged
Conversation
The Measure (Linux) job never finished: every run was cancelled at the 1 h job limit. Under `--watch -fincremental` on x86_64 Linux, Zig 0.16 links with its own ELF linker, which panics (`REX_GOTPCRELX`) on the C objects in the plugin's build graph. The watcher aborted on its first pass, and bench.py, never checking it, waited 300 s for the first pass and 300 s per edit that nobody would build: about 20 minutes per backend, six backends. bench.py now ends a wait as soon as the watcher exits, stops a backend's watch section at its first timeout (60 s per edit, down from 300), and prints the watch log's tail with a `failed` row carrying the error. The job's limit is 25 minutes and the Measure step's 20, against a measured run of about 6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
foxnne
force-pushed
the
ci/plugin-loop-hang
branch
from
October 13, 2026 13:30
cf26cdc to
8cc81e6
Compare
foxnne
marked this pull request as ready for review
October 13, 2026 13:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plugin rebuild loop/ Measure (Linux) had never completed: every run (38083453064, 38077858541, 38012636910, 37975678599, 37969247976) was cancelled at GitHub's 1 h job limit, which put a red X on unrelated PRs touchingsdk/plugin_sdk.zig.Why it ran for an hour
In the cancelled runs, the builds took seconds (6–18 s cold), but every
--watch -fincrementaledit printedtimeout no rebuild within 300 s. Before that, the wait for the watcher's first pass also ran its full 300 s without saying so. That's about 20 minutes per backend × 6 optimize/backend combinations.The watcher wasn't slow, it was dead.
bench.pynever checked it and deletedwatch.logwith the scratch profile. With the log kept (this PR's first run), the reason is:With
-fincrementalon x86_64 Linux, Zig 0.16 links with its own ELF linker. That linker panics on a relocation in the C objects in the plugin's build graph (stb, freetype, tree-sitter), so the build runner aborts on the first pass. That's a limitation in Zig, not in fizzy's build. On macOS (aarch64, LLVM + the system linker) the same commands work: an edit rebuilds in 1–2 s.What changes
scripts/plugin-loop/bench.pyfailedrow to the step summary with the exit code and the firsterror:line..github/workflows/plugin-loop.yml: the job'stimeout-minutesis 25 (was 60) and the Measure step gets its own 20. A hang the bench can't see now ends in 20 minutes with GitHub naming the step, against a normal run of about 6.Measured (run 38247684393, zig 0.16.0, ubuntu-latest)
--watch -fincrementalpanic: REX_GOTPCRELX(first pass)panic: REX_GOTPCRELX(first pass)Measure step: 5 min 20 s; job about 6 min, green. What incremental compilation buys on Linux is now measurable on a newer Zig with
zig_version=masterfrom Actions > Run workflow.Verification
Measure (Linux)completed successfully in about 6 min, with thefailedrows and watch-log tails above in its output.scripts/plugin-loop/bench.py --optimize Debug --backend default --watch 2finished in 29 s with both watch edits timed (1.2 s, 2.4 s).bench.pycompiles. No Zig sources changed, so thezig buildgates are unaffected.🤖 Generated with Claude Code